x86 hvm: don't set periodical timer again until its IRQ is delivered.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 16 Sep 2009 08:29:17 +0000 (09:29 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 16 Sep 2009 08:29:17 +0000 (09:29 +0100)
commit057958b0ab83fe767397a7ef896b4e6ed63529d5
tree7f0fa92196811b7c9b874e4cad305bf1b97d8d75
parente3cc5f93ca77e2b81435a47d76dd8d4cb7524ba2
x86 hvm: don't set periodical timer again until its IRQ is delivered.

Modern Windows OS (ex XP,2003,2008) never use the PIT timer,
and neither cpu#0's LAPIC timer after boot.
Despite that, xen emulates them busily. It's inefficient.

With this patch, setting a timer is defered while its IRQ is masked.

The reasons why pt_timer_fn() simply calls vcpu_kick() are:
- checking by pt_irq_masked() is duplicated. pt_update_irq() also
does.
- pt_timer_fn() is likely called on the same processor
  as pt->vcpu->processor. Hence vcpu_kick() hardly send IPI.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/x86/hvm/vpt.c